Refactored and cleaned up the show.js.erb file.