Formulating cast as function call

  - To: forall T . (T, T) => T
Cleaning up
Some more fixes
Resoring condtional expressions.