Small changes to entity mapping