More functionality and clean up. Changed options some. Added self-wise TOM to permutation outputsfor study