Refactor migrations.
Fix most failing specs so they pass again, still some issues.