Structural and functional studies on the transcriptional regulation of flagellar motility and biofilm formation