Optimizing Imports and Formatting code