Fix assorted bugs in the Tag node.
Finish tag building test cases (#9)