Simplifying mapping code taking advantage of lamdas.