Removed old disabled code and added sort option.