Reducing redundancy in conversion method code.