Redid the entirety of function encryption