Splitted up Syncer class's sync method into multiple methods, so it is easier to read the code.