Working on submissions that point at entities already-existing in the
DB (this is a first draft that passes some basic tests). Minor further
changes.