Added c and mex files to zip. Fixed minor bugs