clean up inspect code