Removed AutoPointer, replaced by direct XCB and free() calls.