Clean up and sort