Split step function
Fix some mistakes: an env was incorrect, and a frame wasn't popped (typo in the paper)