Refactored rename_snippets.rb