clean up settings code