Moved registry lookup into its own module