Added code for tracking orientation and side of surface clamp release.