Refactoring; createBuffer now replaces previous buffer by the same name and releases its CL resources