Refactor how processes are added