LineReader and CircularBuffer are modified
Merge pull request #1275 from gsomix/feature/linereader

Bug fixes and re-factoring for LineReader and CircularBuffer