Started making the lib streambuf based. Made a branch for it.