~85% complete

All major functions defined, just finalizing workflow within main()
and doing some debugging because functions aren't modifying vars
the way I thought they would be. May end up using 'global'? I hear
that's a bad idea, though, so I think I ought to avoid doing that.