Mind fixing indentation here? The original code is using 4 spaces instead of tabs, here you use tabs.

I know the code is not following a single coding standard, but we might want to fix that in a different PR.

Also, another common coding style difference is when using if, such as 'if( cond )' instead of 'if (cond)'.