Little refactoring to make sure other class does not interference with mock registry