This method seems to be growing, may be it is better to split this functionality to more tested class.