more input-stream refactoring to be consistent all over the place