Optimize memory usage.
Improve documentation.