.C. ?? 1-02-39.[??48] In construing N.D.C.C. ch. 40-58, we recognize a municipality is an agency of the state and has only the powers expressly conferred upon it by the legislature, or the powers necessarily implied from the powers expressly granted.