Fix #149 and a couple other issues
Merge branch 'master' of github.com:calzoneman/sync into database