Refactor Detector classes to multiple files #1