Update to improve culling code