NoTask - middleware and refactoring

* Implemented logging and performance middleware
* Refactored configuration, defaults and other areas of the codebase