It is weird to require itself. I don't think we want this way to pass ImageViewer module. I was expecting that you create a constructor here and convert all functions to methods of the new object, then pass to register function call with a new instance of the new object.