Rewrite the way HUD IDs are handled