Tidy up output and convert strings to ints