Test Case, toString for formulas, more logging