Cleaned code a bit, removed useless middlewares