Adding missing dependency jquery-ui-rails
Refactoring JavaScript hence allowing other scripts to reload spaghetti