Group gems into environments properly.