Updates to comments, documentation

Also updating the variable names and prefixes where relevant.