Node and numNode class modified to add Generics