Migrate peer.stream inner workings to models/stream