Add API to use module definition from factories