improvements to Entities and mappings and imports