Cleaned up some code and a lot of unused files