Refactor Settings application