Add input data stream
Prepare event handlers
Register data stream and handler for input
Register output datastream