Moved towards a toString implementation of expressions rather than using templates. This allows much more flexibility.