Reformat variables