Added sorting feature and settings