Cleanup

Some cleanup in the middleware.js file
Added an editorconfig to keep things consistent
This isn't needed because of the above `[*]` declaration (at least when done right)