Open
Description
ConvertState has been organically appended to over the last months/years and is now a 1k line monstrosity. Skimming through the function it appears a lot of looping is duplicated work and it's become quite difficult to read. It could use some love in being refactored with a control flow that's easier to flow.