Moved database classes to another library