DNN-18204: refactoring code.
DNN-18204: refactoring code.

svdv71/Dnn.Platform,RichardHowells/Dnn.Platform,wael101/Dnn.Platform,svdv71/Dnn.Platform,mitchelsellers/Dnn.Platform,mitchelsellers/Dnn.Platform,RichardHowells/Dnn.Platform,svdv71/Dnn.Platform,valadas/Dnn.Platform,bdukes/Dnn.Platform,valadas/Dnn.Platform,robsiera/Dnn.Platform,nvisionative/Dnn.Platform,wael101/Dnn.Platform,dnnsoftware/Dnn.Platform,bdukes/Dnn.Platform,EPTamminga/Dnn.Platform,nvisionative/Dnn.Platform,EPTamminga/Dnn.Platform,RichardHowells/Dnn.Platform,valadas/Dnn.Platform,dnnsoftware/Dnn.Platform,mitchelsellers/Dnn.Platform,EPTamminga/Dnn.Platform,bdukes/Dnn.Platform,valadas/Dnn.Platform,dnnsoftware/Dnn.Platform,nvisionative/Dnn.Platform,robsiera/Dnn.Platform,wael101/Dnn.Platform,robsiera/Dnn.Platform,RichardHowells/Dnn.Platform,dnnsoftware/Dnn.Platform,dnnsoftware/Dnn.Platform,mitchelsellers/Dnn.Platform,valadas/Dnn.Platform,mitchelsellers/Dnn.Platform,bdukes/Dnn.Platform