Adding the new material from Rails 3 version and changing many views and the Javascript functioning