Migrations and small fixes