Removed a bunch of unused variable here, that's not strictly needed for the patch.