Updated to perform a much more efficient hlink algorithm that doesn't