Fixing up various bugs from changes to DB classes