Finished buf_chunk feature and added tests