Standardized and made to work with xgoogle. First should-be-working commit.