Integrate REL file code in di provider and squash some bugs