Added temporary db admin functionality.
Clean up of config and database code.