removing unused code
reactivating @javascript tag just where needed
removing deprecation warnings for Rails 4.1