Javascript cleanup for groups.