Minor refactor of IOStream and ConsoleBuffer