refactor script_tags.rb