Clean refactoring of the official Google API for PHP