Optimize imports and code formatting