making tensor module more sympy conformant and minor issues