VT - cleaned up work in progress code and fixed broken tests
VT added test helper to help stub API in unit tests.