Added comments for variable and function explanations