Adding legends and comments to code so that I can understand what's happening when I look at it later