Singledispatch on selenium element and form fill

plus some other fixes and refactors.