re-organized the cbuf extension for libccv