Started work on a state machine that will be used as a new implementation of applyRollToFrame.