An extension of https://github.com/schani/icfp-2004. Sorry, I screwed up the git. I should have forked. Meh.