Added graph reading from file and improved parsing of node labels