App mode + refactor