Document and clean up variables