Added very simple database plugin and the beginnings of metadata indexing