Document in the code, and cleanup