[DONOTMERGE] Refactoring the code that fetches all test modules

Work in progress. It included PR #1 :)