Fixing file indentation
Added dispatchEvent() wrapper method.