move class MapAccessor to separate file