Added DataLocker class for database encapsulation