Added generalized settings function.