New entry storage scheme

Using the new entry id scheme, misc other changes and cleanup