Save Config Method

Added saveMainConfig() method. Use this in other classes to save the config. I'm still not sure if it will work or not, I'll let you do the testing.