Fixed files for MATLAB and now builds on OSX again