Implement Detect, closes #4