Added final cleaning up of variable names and tidied up the comments.