t/common: Refactor the builders so it will be easier to add hotswap support.