Added Initial Management Console

Add the initial management console
Moved the database code to a seperate file and updated all database
calls