Added sorting and debris