Factor out appendLessVarsToUI.