Minor refactorings to fix build.

Signed-off-by: Victor Marmol <vmarmol@google.com>