Rewrite to module manager compliant version