Finish migrating code