do is a reserved word in JavaScript (do..while)

We'll use complete instead. It worked but jshint complains (and it's
probably a bad idea).

Also fixed two minor equality checks to use ===.