Move inspect code to the util namespace