Issue #5: completely separating syncData, checkData and $scope populating data logic