Some simplification of the logic