Code optimization.
Add doc.
Adjust writing.