Added EEPROM functions and documented code