Code cleanup and import organizing.