Add coments and refactor some of the code.
We want images, css and json to return a 404 in the response headers so that caching servers don't persist the maintenance page after systems are brought back online.