Changed weight from int to double in Path.