Implemented iterative preorder and unit tested preOrder() and buildTree().
Added comments.