Use the WordPress Settings API for the settings.