Module Manager refactor

Added extra check to the dependencies of modules

<!---
@huboard:{"order":281.0,"milestone_order":281,"custom_state":"ready"}
-->