Clean-ups and simplifications, preparing for registry conditionals