Corrections in Graph and Xsl

Ternary is removed and code is refactored