Refactor things to use a shared registry handler