Rename middleware to serverConfig and clean up code

Rename middleware.js to serverConfig to make it consistent with our directory structure.  Also, removed utils.js as we do not use this file at all, as well as doing some code-cleanup.

@jjmerino, @kmeurer, @jamesongamble, @suprbh - please review and merge this request.