Add events api listenTo and stopListening for fixing memory leak