Making it compile on OSX. Still got some linker errors.