Simplified the DatabaseService class