Working snapshot of #258.