Refactor inner workings of registry.js
Merge remote-tracking branch 'upstream/master' into storage-interface-dev