Managing hierarchical data in iOS