Initialize variables when declared.

Not __shared__ anymore, so we can just use real initializers.
Also, remove some bogus comments.
minor changes.

add missing comments, delete idx_of since it was only there for
debugging.