Cleaned up and removed some code that needs rewriting for this project.

Also fixed things that broke related to this...