Refactoring and general code cleanup

Moved a couple classes to the correct project, updated some code and
cleaned it up a bit