[#6] Code cleanup. Fixed bug with saving configuration.