DNN-3582 - cleanup code