Fix macros

- Add tests for macros.
- Re-add setting for macro that was erroneously deleted.
- Fix bug where macros appeared at end of source.
Merge pull request #88 from bukzor/fix_macros

Fix macros