VID-676 some code cleanup