Updated code to work without AutoMapper