Fixed minor issues. more docstrings