Passed db.js through JSLint. Lots of style changes