Safety commit: added test support for clearing DB and loading content, added tests to load and query ref data categories