Fred - Changed Node.cost() to return a double (not an int)