Changed implementation of tr module.