Added text matching features to buffer

Added tests, made buffer next and peek features less smart, restructured base buffer to better reflect that.