Improved sync function.
Added global post and improved sync function.