Added clarifications to method document.
Fixed bug introduced with optimization.