Some little refactoring. Still need to figure a way to stop execution of rule evaluation when needed