Moved a couple of functions into TextEcot