Moved some code and improved commenting

The method that runs the algorithm in different ways has been moved to the top.

A comment breifly mentioning what the test does has been added.

Refs #2057