The mayor and council shall constitute the legislative department of said city, and as such shall have full power and authority to establish such rules, laws, ordinances, regulations and orders as they deem proper, respecting any and all municipal affairs, and which they may consider necessary or proper, or incident to the good government of said town, and to the peace, security, health, happiness, welfare, protection or convenience of the inhabitants thereof, and for the preservation, peace, good order, and dignity of said government. [Sidenote: Powers of mayor and council.]