Use shared_ptrs and don't call delete on buffers explicitly
Don't do fully qualified static name