Simplified code by placing all necessary functions in the same detectright package
- updated directory structure
- updated test file