Extract methods out of exec.rs where appropriate