Major refactoring

Removed reconnecting mechanism; simplified signature and timers
Major refactoring

removed state getters but leaved the getConnectionState method; remove
some reconnection-related handlers
Added reconnection mechanism and small refactoring