Improvements to the rax inventory script