Changed the mapping from User to Group, dealt with self-referencing models etc.