Implement new sorting buttons in all views and clean templates.