The results of Szele and Szendrei [‘On Abelian groups with commutative endomorphism rings’, Acta Math. Acad. Sci. Hungar.2 (1951), 309–324] characterizing abelian groups with commutative endomorphism rings are generalized to modules whose endomorphism rings have various restrictions on their idempotents. Such properties include central or commuting idempotents, and one-sided ideals being two-sided. Related properties include direct summands having unique complements, or being fully invariant.