Improve usage of inspect()