Refactored important code into modules.  Added a csv-decoder.