new rewriter library + ability to use and create  macros