Agains some refactoring and started to move the detector stuff into a earlier lifecycle phase.