Refactor, added logic to controllers, cleaned up routes.