(a) The mayor shall appoint a town attorney, together with such assistant town attorneys as may be authorized, and shall provide for the payment of such attorney or attorneys for services rendered to the town. The town attorney shall be responsible for providing for the representation and defense of the town in all litigation in which the town is a party; may be the prosecuting officer in the municipal court; shall attend the meetings of the council as directed; shall advise the town council, mayor, and other officers and employees of the town concerning legal aspects of the town's affairs; and shall perform such other duties as may be required by virtue of the person's position as town attorney. (b) The town attorney is not a public official of the town and does not take an oath of office. The town attorney shall at all times be an independent contractor. A law firm, rather than an individual, may be designated as the town attorney.