Fixed thread access
Fix build issues
Readded extension ch.elexis.ServiceRegistry