updates to mappings and dao and other associated bug fixes