Analysis file updated with comments to explain code