Add set_status method, and insert calls to the method in relevant contexts