Finished the first working state of logicMacro.

Lots of testing pending.
All tests now pass with the new logicMacro.