Merging the node class.
(1) Merge all functionality from the prefix tree code. (2) Added headers and cleaned up the code.