Cleaning up data sorting in view.