refactor: move functionImpl to model package
binary operator now an enum