<div dir="ltr">I'm looking for sugestions on how to better structure this code.  I stuck it in a pastbin:<div><br></div><div><a href="https://pastebin.com/gQFmvq6W/">https://pastebin.com/gQFmvq6W/</a><br></div><div><br></div><div>Would a State monad help?</div><div><br></div><div>Thanks!</div><div><br></div><div><br></div></div>