Added connections between parent and child elements.
Moved constants to settings.
Fixed atoms and bonds not clearing.