Refactor app setting