Improved history.rb