Refactor frames to be in-place