Essential idempotents and simplex codes