Delete unused code and add SyncAdapter