Edited test code for 11.8
Fixing issue where code didn't work for trees with MIN_VALUE and MAX_VALUE
Code simplification