Improved triage rules and implemented the triage procedure on the main wrapper