Implmented listeners for sync manager
test cases
refactoring