Refactored the refer code, integrated mod/branch delete pages into the logic.