update for settings page for display and saving

using array and dynamic variable to simplify this a bit