Added context enforcement; set entry type to use level when a type is not explicitly set.