move database classes to new directory structure