added arbitrary boolean tree support for writing regions/combinations;
added default values for creating primitives;
WIP: support reading/writing primitives, both from DB or newly created;