Some improvements, more consistent docstrings.