Refactor controllers, update layout