Extract class to reduce imperative code in Mapper