New service tests, and utils.test and serviceClass refactor