[TASK] Refactor core usages of testInt, calcPriority, calcParenthesis