merge from master
completed refactoring of sync lib, yay! tests passing