VID-648 code cleanup