DRY up the state setting a bit and make fetching groups/lights easier