Description: Improve moduleManager and Add utest

Issue: NA
Author: Arnaud Joubel <arnaud.joubel@gmail.com>
Review: NA
Test performed:make test
Test result: pass