Registry management code