Refactored expression printing