Code restructure
Group management refactoring