Added macro support.  Pretty messy, but works for now.