Removed unnecessary wrapping of whitespaceTrim into Option as spotted by JakeCoxon. Added doc to leavesText and renamed leaves var to leavesTxt for better clarification.