update DB stuff

made it so the activity has the main reference to the db, and opens and
closes it. the fragments will just get the db ref from the activity when
they start