Tidy up logic of embed
deepcopy to avoid modifying raw properties