Moved to separate class the monitoring and changing session state to starting communication state . This  will decrease significantly the amount of queries to the database .