Refactoring user group code and css