Fixed compile errors.
Added migration factory.
Merge pull request #1 from jan-schubert/migration-factory

Migration factory