Split results parsing from index handler
Split results parsing from index handler

This puts the logic for finding the latest results and their totals into
a separate function.

The indexData struct is also split as a result of this and the scanData
struct embedded.

jamesog/scan,jamesog/scan,jamesog/scan