Add eeprom support - needs testing!!!
Rename some variables for eeprom