Added indexing functionality to the database module.