Add docstrings to processing functions