Use different variable names
Add/update comments
Fix crash