Hygiene: Refactor WikiGrok code

* Take code outside a function that's only called once

Change-Id: I4b75e64d11eba73932f96bd00522a281abe34dc8
Merge "Hygiene: Refactor WikiGrok code"