First improvements

+ Avoid useless calls of functions prefSAT, pref and Grounded, as
described in the slide "Qualche altro miglioramento"