Compile Fix: Using singleton for database connection and cleanup