Renamed some files and fixed a bunch of compiler warninings / errors
More compiler errors corrected
Starting to think about how to call from matlab.