Refactored memory mapper into prod&cons model.