More changes to I/O.  Tried to rename things more intuitievely.