Then Foreign Secretary Philip Hammond was responsible for drafting the legislation for the referendum.