Format and optimize imports