some refactoring - much closer to working now on www.yahoo.com, still https niggles, including https://www.google.com