Moved Sunlight API calls to separate file in server folder