Added REALM migration
Added more tests