Added migrations and more tests