Add docstrings and move raven to the utils