Improve inspector script