Added weight property to Edge class