Motifs, modules and games in bacteria