added some more eeprom routines, cleanup of code.