[wip] Some work on CPTensor and tensor stuff in general