move database classes to Database.cs (issue #11)