StateRegistry: JSDoc updates and minor refactoring.