Aww! Much better! Thank you for taking the time to do this. I started cleaning things up, but my latest update was still felt too verbose and messy. I'm going to incorporate these suggestions as soon as I can, your changes make more sense and are more efficient.
I am confused some on the scope of you're hashes, why are they able to be shared if they are not declared as global?