Externalize Google OAuth settings and did code cleanup

Externalize Google OAuth settings and did some code cleanup.

@jjmerino, @kmeurer, @jamesongamble, @suprbh