Break out detector into its own class