Cleaned up logic on Index View