Refactoring refac_funApp