in reply to Cleaning up Code

Before even that -- document your test cases, if you don't have a pretty good set of .t files already. It's imperative for you to be able to definitively state, "The code functions exactly as before" once you're done cleaning it up. ( Or, more likely, "The code now functions exactly as it was supposed to all along" )