Add class for remote registry, do some refactoring in engine