Move middlewares to a method
Make routing more declaritive
Refactor now working with default settings
Update views for new API