Refactored code in an attempt to include CSV uploads.  Decided that was stupid, and re-refactored.  All functionality appears to work now - cleaned up code for readability and dropped unnecessary lines.