Added initial middleware setup

First initial middleware setup