Add some improvements to fuzzy logic