Added examples and updated docstrings