Updating the binary tree implementation to use abstract class

and implementing a mechanism to detect the most commonly occurring item.