Module Manager refactor

Added extra check to the dependencies of modules
new class