Sort declarations and imports