Remove unused fmap.
Extract the pure functions into their own namespace.