Section 24. And be it further enacted by the authority aforesaid, That it shall be lawful for the select and common councils, when duly assembled, from time to time, by any ordinance duly enacted, to vest in the mayor of said city for the time being, the appointment of such officers within the said city as they may think expedient for the well-ordering and governing the same, and to remove the same from such offices or appointments for misbehaviour or otherwise as may be necessary; all which officers shall take an oath or affirmation, before the said mayor, recorder or alderman, well and faithfully to perform the duties of the offices or appointments to them respectively committed; and the said councils may require security to be given by such officers, or any of them, and prescribe the sum and the form in which such security shall be given, and the said officers and their sureties may be sued and recovery had against them in the city court, for breach of official duty; and for the recovery of fines, forfeitures, penalties, debts and other demands, cognizable in the city court, the ordinary forms of law shall be pursued in the process, judgment and several kinds of execution, as if the same were made cognizable and recoverable in the courts of the county; and all officers and jurors of the said city shall be competent to hear, try and determine all matters and things within their jurisdiction, and all citizens to give testimony, notwithstanding any fine or penalty be made payable for the use of the said city.