moved tensor code into core. fixed curriage of Coeff.mk