Added sorting to links