Cities and towns shall be bodies corporate, and, except as otherwise expressly provided, shall have the powers, exercise the privileges and be subject to the duties and liabilities provided in the several acts establishing them and in the acts relating thereto.