Corrected the case of some variables
Tidy up and restore upper cased required modules