Cleanup in gpu accelerated panel update code