Added better logic around determining which numbers need parenthesis during source transform.