little more cleaning up and added a database config file