HTML5 Videos event firing refactoring. Some bugs fixed