Fixed up the database code to use the new scheme. Moving on to getting
collections set up in the control flow so we can lock up the basics for
the barebones alpha version.