Add migration. Minor fixes