Fixed up to run under modern Go.