Added comments to tree algorithm. Changed path selection to be equal to its source x and y coordinates instead of just its x coordinate.