Internal refactor for clarity, moving #exec and #pids to class