Cleanup

Some cleanup in the middleware.js file
Added an editorconfig to keep things consistent
Shouldn't this be `space` not `tab`