Added JSDoc comments to rotor.js.