Gain comparison working

Both recent and overall gain comparisons are now in working order, and
I'm in the process of restructuring the program to be more modular, as
well as starting work on a simple user interface.