Code cleanup in inspector text field