Changed (x,y) tuples into Node class
Updated code to use Node and fixed python>=3.4 issue with format