Made prime utilities more Haskelly.