Performance related changes, move some of the MySQL table updates to a cache (lru_redux) and some to a memory table (sqlite).  Also replaced all tabs with spaces.