Fix bug in sram size
Clean up EEPROM functions