Fixing connect close functionality
Fixing #31
Resolving conflicts