Added tests and rewrote how configuration parameters are saved.