Merge pull request #12 from dirkhh/moreCleanup

More cleanup. Fix for nFields.
Make visualize.js more readable

This is almost exclusively a change of indentation levels (by modifying the way
the code checks for an error when connecting to the database). There are a
couple of minor changes on when we throw an error versus just report it.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>