to get tests to pass add a hack-around to allow us to clear static var
minor tidy ups