remove commented-out import
move some less-important code out into another file
preserve the ordering of the series for the reporting UI