Implemented adding relationships to added items. Doesn't yet include sorting items by type.