Adding google code commits r5836 to r5849. RIP in peace google code.
Merge pull request #26 from Petethegoat/master

Adding google code commits r5836 to r5849.