Moved process creation to top-level.