more reliable (if less explicit) detection of test mode
simplified and un-js-ied group selection
hooks for testability
test operations on groups