Bugfixes with role and starting work with groups