Section 97. In towns which accept this section or have accepted corresponding provisions of earlier laws there shall be a police department established under the direction of the selectmen, who shall appoint a chief of police and such other police officers as they deem necessary, and fix their compensation in an amount not in the aggregate exceeding the annual appropriation therefor. In any such town in which such appointments are not subject to chapter thirty-one, they shall be made annually or for a term of years not exceeding three years, as the selectmen shall determine, and the selectmen may remove such chief or other officers for cause at any time during such appointment after a hearing. The selectmen may make suitable regulations governing the police department and the officers thereof. The chief of police shall be in immediate control of all town property used by the department, and of the police officers, who shall obey his orders.