Change funcs to classes