Rewrite of MLP

by ShaD-23