Moved database classes in own package, plus refactoring of database migration