Bit more clean up.
More
This function is THREE THOUSAND TWO HUNDRED AND THIRTY THREE LINES LONG.