Several fixes to make the script more robus. Still lots of hardcoded delays that are really dependent on the users machine and internet connection