Refactor: Use standard callback signature for db

Use `function (err, data)` as the callback
signature for getting things from the database.