A version with less number of bugs.
New code for run an indexing queue and indexing thread which runs every 24 hours