TML finally working (with Negation and optimization)