Fix review comments
Update automation.js