Move more shared I/O functions.