Added docstrings + some formatting