Rename some variables, add comments, use anonymous lambda function as parameter of TimeFunctionExecution