Changing factory to use sunlight api