do not clean history when opening a database
don't store a fake root item (id 0) in core.items.items
sort occurrences in the interface
use JSON for storing item rules in the database
don't try to hide bad id type
store items in each database object