Touchups: organization of db functionality.