Adding missing globals and phql cache destructors