Merged flags with register. Refactored register to genregs. Added EEPROM model.