Refactor and test migration to new builder