I think when you say 'should I create a model' you mean 'class'. Rather than that, I would just follow the suggestion in the Cookbook article and create an included PHP file. I might then preface all my global functions with a letter to avoid any clashes (eg. PRemoveSlashes(), PAddSpaces())