Changed the nodes method back to a map.