Created and improved docstrings and comments