First draft attaching data to the frame. Un-optimized.
Minor cleanups.