Making it compile on linux

Closes #201 
Is this just a refactor or was it a compile problem?