Fix some docs, and "clever" code, and fix an incorrect variable name