Added docs for optimizations.