adds comments, fixes var names.