Added docstrings to controller