Refactoring osgi.utils