Preparing mex version for Windows

Cleaning code