Changed i/o methods to use io.Writers/io.Readers instead of []byte