Refactored, moved to sync callback, added tests, bumped to 1.0