fixes, cleanup and lint

We use your great project a lot now at x.ai, so a huge thanks from the team.

What I've done:

- removed Procfile as Heroku can figure it out by looking at `"start": "node app.js"` in package.json.
- fixed some bugs.
- the code now gets a ✓ from [jshint.com](http://jshint.com/).
- if it looses database connection, it will retry every 5 seconds.