Adding google code commits r5836 to r5849. RIP in peace google code.