Removed a lot of old code that I won't be touching again. Refactored some code elements into more logical places.