Cleaned up app.js

Removed app.use environment handlers. Turned minifier import into a
single call.
Changed database connection flow

Still work in progress