Update docstring and minor fixes