Cleanups in generator

R=sgjesse@google.com

Review URL: https://codereview.chromium.org//508053002