Dusted a little (after a few years of leaving it sit around, the code seemed to rot).