Moved into apps

Made changes to the models and started fleshing out functions.

Database utility file created.