get a bunch of fixes pulled together for the new DB structure