settings, email and refactor