Refactored mapper