cleanup .map and .map_err
ToEither + tests