Move inspector logic to Inspector