VID-1945 more cleanup and bug fixes with refactor