Fixed a few comments and then added the ability to make document indexing non-immediate