Added a function to collapse unary productions. Added a test for TreeSet. Added a check to ensure interminal and preterminal types are disjoint inside CountSymbol of TreeSet. Separated subtree deletion from the Node destructor so that it is possible to remove node by node. Separated ASSERT macro into a separate file. Cleaned up notation.