Added Unit tests. Refactored the module usage service