Added simple one pass path compression (processed element points to its node)