finished cleaning and modularizing. That code is as clean as I can make it. Now let's see if I can get some real data to stuff into it.