Added some docs and enhanced line reader.