Guys, no need to beautify this as the whole method has to go away (it's a monstrosity as noted in the TODO) :)