Moved wait to bottom of loop. cleanup some old comments.