First round of Gmail support fixes.