Move to sync api. Fixes #11
Merge pull request #14 from mrjoelkemp/api_changes

Move to sync api.