moved element refs out of m.did

now all m.did elements have own definitions