Extract logging into a middleware
Add a proper environment object w/ accessors