Have just one copy of occurs checks
slightly shorter code for counting occurrences

Mainly so that both occurs and occurrences look the same
Fix printing of parens in application and products