fixed some general js coding issues in the Groups dropdown code
fixed some issues in the groups menu js