Renamed service to factory to make it more obvious what it is.