Group selector improvements and js cleanup