refactored gmail pages and tests