Cleanup detector base

Refactored event process handler