some pythonic refactor, more selenium ide compatibility fixes