Docstring and comment improvements