App refactor