Removing unnecessary "which" calls