fixed migrations, refactring models