Coupled cell networks: Semigroups, Lie algebras and normal forms