Added edge maps, cleaned up copyNodeSetMap and guessElementShape