Refactor apps