Changed searchTree logic and added maxLength variable to keep track of tree height. Bugs to be fixed.