tidy up a few things

moved many constants into globals
moved temperature into its own class
finished temperature class