Refatored Doctrine Mapper, reducing complexity.