Ugliness is in the eye of the beholder. There's lots and lots (and lots) of different ways to do it.. I'd probably use a hash-of-hashes, but hey, what you've got works, it's easy to maintain, and it is brutally clear what it does and how it does it. TMTOWTDI, and all that.
Personally I wouldn't sweat it unless you were planning on vastly expanding this program, or were trying to make it into a more generalized solution, and if that's the case you're definitely in wheel-reinvention territory. :-)