Sethu - mapData should only be called after required checks and trimmings are done
Sethu - Fixed defect in mapData