Code cleaning and optimizing imports