Created some useful macro definitions
Took a bit to get the references to work correctly, and I had typos