Refactored the middleware
Refactor the environment loading a bit
Load the environment before express so our defaults are set correctly