cleaned up some mex routines