Many steps toward getting refactored code to work with loading data. Fixed a bug in the way the id was being saved with resampled data.