Added database and database funcitons
committed

Committed again