improved Selector.prototype.focus
improved some functions