Uses the global variable c to hold config details