Organize containers by ID and parent/child relationship, fix #345