#488 Small refactorings in apiv2