Explictly remove and add handlers during the startup/shutdown processes and modified the ordering to hopefully resolve some timing issues.