MDL-38501: cleanup code