Moving mapping functionality to objects.