Updated DB file to have some basic DB functions