Porting io to std streams. Working.