Implemented database layer
Added a standard config mechanism