Minor changes

Corrected a cut-paste error in the SMARTS item (not the SMARTS used in
the function) for rule 23.

Added "import collections" to the same code-block as the generate_keys()
function.