Cleaned up bug index code