Adding the commented versions of the actions.js code.