Fix the type system so the correct types are returned or ignored by the closure compiler.
Rename Reader to Buffer as it is more appropriate.