Merge pull request #530 from leider/master

Small refactorings & migration script extended
Merge pull request #531 from leider/master

change in migration script