Added sorting to kcluster and shellorder in order to have more consistency.