New sync functionality
Bugfix on last commit
Merge pull request #83 from tomvantilburg/master

New sync method