removed unused services and added syncService and cacheService
changed state ref from waste to discard count