The town council, by ordinance, shall have the power to require any individuals or corporations who transact business in this town or who practice or offer to practice any profession or calling therein to obtain a license or permit for such activity from the town and pay a reasonable fee for such license or permit where such activities are not now regulated by general state law in such a way as to preclude town regulation. Any fee charged shall be a reflection of the cost to the town to regulate the business. Such fees, if unpaid, shall be collected as provided in Section 5.18. The town council, by ordinance, may establish reasonable requirements for obtaining or keeping such licenses as the public health, safety, and welfare necessitates.