Removed unnecessary function gen(instream, outstream, errstream) definition

The function definition for `function gen(instream, outstream, errstream)` was hard coding `STDIN`, `STDOUT`, and `STDERR` so I've removed that definition and changed it to the definition for `function gen()`.