Adding comments and tidying variable names