refactores nodes; added SetFunctions and BinarySearch;