Refactored code in apps