Explainary Comments for Macro Code

-Added explainary comments to macro code.
-Some minor cleanup and refactor to reduce code duplication.