+ some refactoring and fixes for data migration