Remove unneeded yield and add docstrings.