partially refactored expand_macro
significant refactoring of macro_expand, all tests pass
Merge remote-tracking branch 'origin/master'