Refactoring Type Migration

Checkpoint -- still need to check legality.