Work on sync functionality
Moves sync related functions to seperate class