Upgrade markup for macro-level library. Some other minor enhancements.