Documentation and optimization.
Refactor and doc update.