Clean up and allow sorting