Created a Database class. Moved user helpers to a seperate file.