Cleaning up index and various tables