Fixed some display issues; added sorted order functionality.