Code cleanup: organize imports and warnings

Only keep those unused imports that are introduced by generation. 
19 files changed