Started refactoring user and group functionality