Fixed encapsulation problems

Fixed problems introduced with encapsulation of Migrator by passing an instance to the migration script