Add fns and continue to refactor