Fixed thread crash bag. Added callbacks after rebind service. Code refactoring