Refactor to use more straight up ids (typeIDs) instead of a structure