Housekeeping

Expunge detritus, reinstate variable names, fix string error, match capitalisation.