Added comments in main.rb to describe each action