Refactor SUBST to use COND
Add POP macro