Covnert rect.h and add package tools to help the conversion in the short term