added fix for google drive and cleaned up code a bit, be sure to revert on any errors to whole process