refactoring the database module into a class
refactored config into separate files