Commented code

Changed variable names and added comments to make code more readable and self-documenting