Updated to latest tensor library from Dmitry Lyakh <quant4me@gmail.com>