Quick-and-dirty rewrite of Dispenser's Reflinks