Refactor and add a datatypes.h