Refactored code to elimintate template parameters TerminalSymbol. Now TerminalSYmbol is a typedef in slp_vertex.h. Looks like there are no benefits from using multiple types.