Separated out input stream handling into separate Node trait to reduce unnecessary type params for output generators