fixes + unit tests for service.local