Add negation
Rewrite expression optimizer

Use analysis instead of rewriting, much simpler and better results.