Add DeadDetector tests + split up optimizer tests