in reply to Code refactoring challenge

I'm with merlyn on this one re: my() at the beginning. A few other thoughts:

The Perfect is the Enemy of the Good.