Added sorting to all the lists in the application. Other bug fixes