VID-696 some code cleanup