Missed the final local variable inside of the first function. Removed it. In my eyes, the function is completely refactored.