Implemented `aux.py`. Also updated some comments, documentation, and error messages.