Refactored IOStream to IODataStream
Refactored to move stream creation to the controller