Code cleanup and optimize imports.