Data structure munging almost finished in stacker.py