Refactor code to reflect Inspector API changes.