Refactored 'Database' Class