Refactor of Settings application and tests