Adding save function to the settings controller