Make the engine compile on windows, also fix the simplex function to actually work (it was working by sheer coincidence before)