Initial migration

Structure is more of a draft, migrations should help later with updates
Fixed some database and path issues