MUST provide the input_file as an argument

Commented and cleaned up some variable names.
Randomly choosing nodes seems to improve the result, so I removed the ordering and left it as is. Not 100% sure this is the way to go.