Add unit test for v2 model, minor cleanup