Commented alerts, console.log, and edited comment describing script's function