Merged in code to support function style macros, fixed some unit tests, some cosmetic changes.