Code tweaks

* Using app.enable()/app.enabled()
* Better server error handling