Fixed rename script.
Cleaned up rename script.