fixed the canonical SMILES conversion and a few cleanups