added groups; fixed some js issues