Ok, so now we're going back to what we had because storing functions inside a database may be a bad idea.