Better exception handling and other cosmetic changes

Firefox version if cannot be returned blank is set.