Removing nesting in sets (old version on nested branch now)