Old code for causality flag and related changes