Cleaned up loadConfig a bit and moved hash checking to seperate function
Tidied loadCOnfig some more