separated files for views and js
factorized views/index.erb
from here document to erb template: update
refactorizing. Cleaner now