Implemented some of reader. Forked off to input lib.