Combine redundant parsing code.