Refactoring and re-structuring in preparation for Google Drive support