I worked up a PERL script that takes Audiofile Internet Companion output, breaks it up into HTML files (1 file per album), creates pages per letter (a-z), and creates a TOC of all the pages. It also links related MP3's on the HD to the individual songs. My next trick was to put together what you have already done...
I see my code as embarassing as well.