Added Docstrings for Functions

Added Docstrings to the functions so that they can be better
understood.