cleaned up logic for secondary node relations. minor aesthetic changes as well