Small refactor to remove replication
Refactored the inspector