remove Registry anti pattern