Refactor makeId, might have broken things