Further speed up, by removing redundant queries