Improved base tree

Added trunk + 2 branches, and function to compute end of line position.