Added basic class-group restriction (classes can either be global or restricted to one group)