final work

Added ability to deregister the custom messgeeventhandlers

clean up the iOS sample