Simplified Tensor constructors.
Fixed errors in permute functions.