fix bug with incorrect target value with in case of it's DOM
fix bug in $Element.on + minor improvements
introduce _legacy helper