Create db package

Moved the database read and write functions into their own package