Refactoring routes and handlers, adding theme routes