Added so that all settings are erased before new are written.
Added save to flash and read from flash functionality for control module
Fixed minor errors