Some work on getting peripheral nodes. Manipulation of peripheral nodes on merging yet to be done