exec.rs: Refactoring