Major rework of IO.