Switched to a sorted list implementation, added sorted list functionality