Updated the code to use either the EEPROM library or the built in IAP calls