Cleaned up routes and some code