formatting and removing dead code
moved the eeprom write into the table suync by settign flags.