Refactored architecture of module