Refactor migration methods to use some common utilities functions.