Cleanup code and documentation of the `assertions` tool