Refactor data provider