Revised code commenting

Also, the code was unnecessarily passing data by name rather than
value, which is weird.