Fixed Service Factory and tests