Refactor

Refactoring Database and Configuration classes for more efficient use.