MAJOR CHANGE: MEX SIMPLIFICATION IMPLEMENTED (Thank you Selpahi!)