Fist version of molecules in group generation.
Some improvements to molecule generation code.