VID-2089 some code cleanup