aa5113b1fd
Refactor overly large functions by breaking out helper functions. Refactor overly complex multi-purpose functions into separate more specific functions.