Added macro functions, and tag support