Add basic documentation for optimizing()