Big Refactoring and Implementation of decision making process similar to the convergence client