Rename more buff entries.

Also move some 'global' data into main function.

Signed-off-by: Thiago Farina <tfarina@chromium.org>