Improved the sync servive so that it is more re-usable (particually by the cspclient)