Extracting local variable and formatting the code.