Split synchronize into a class