Minor optimizations done. Works based on Entropy.