Finished basic app structure and database functions