finished rework of component handling
fixed bug (components were removed together with unattached nodes)