Fixed a few bugs. Added buttons to sort, show and leave. Implemented
sort.