Refactored the mapper class to be part of a pool