Update haml-rails for better Rails 4 support
Finish refactoring JavaScript