code refactoring for models and views: first version of tres models for pf functions