Handle multiple levels of groups more logically