Added sorting, UI changes, bug fixes