Reverted commented out line since it is not responsible for the double test runs. More investigation required.
1. Wired up extraction to the public API
2. Added a test for the public API
3. Added missing tests for folder checking
4. Refactored as needed