add rake tasks
refactor js