Refactor procedure logic.