change vr.go code to not use any global objects--should make testing much easier
make vrviewchange also have no global state