Various work on causal dictionary.
Code cleanup for causal dict.