Fixed code, compiles now
Merge pull request #8 from Nyle/master

Works now, lots of fixes, can compile