Add docstrings and make exceptions better looking