Remove googleapi.js lib and rejig widget js code