Implemented term renaming