Temp fixes to get my current project up and running. Needs major refactor.