Added some functions, updated TSJ with new functionality