Refactoring to complete the DM's migration to OSGi