Added sendEvent method and refactored options introspection