Even more simplification

Also fixed another bug in the "lazy" input stream.
Merge remote-tracking branch 'origin/master'