Cleaner temperature display code!

Hey all,
I'm a right newbie to programming, been learning a fair bit the last few days since I've had the arduino, I am quite okay with electronics so thats helped! :stuck_out_tongue:
I have a onewire DS18B20 and the arduino uno all wired together with a 7 segment display I had lying around (annoyingly its common postive so thats made it a lot harder to code for but hopefully I shall be getting a dual common negative 7 segment display to show temperatures.
For the mean time I have the temperature range setup from 0 to 30'C and if its double figures the display will flash the digit.

Being my first real project, the code is quite messy and quite complex for a relatively simple job, is there anything I can do to clean it up and make it smaller?

Here is a link to a text file:
http://www.chalky92203.adsl24.co.uk/1segmentdisplaytemp.txt

Thanks in advance,
Ollie

There's quite a lot of code around using arrays to define characters for seven segment displays.
Your thresholds could probably go into another array.

Check this library to ease the temp reading - MilesBurton.com