Did some refactoring to improve readability
* now using range for-loops during Tree printing
* inroduced popNode helper method which helps to simplify the Tree construction implementation