MOD: changed groups to be a real class instead of maps and lists of things
MOD: fixed severe bugs with the safe spot implementation